package ace.module.upms.core.impl.controller.rest.rpc;

import ace.cmp.rest.spring.data.jdbc.querydsl.core.controller.sdk.AbstractSdkRestController;
import ace.cmp.security.oauth2.resource.server.core.annotation.PreAuthorizeIsInternalClient;
import ace.module.common.api.annotation.ApiRemoteImplementPriority;
import ace.module.upms.api.UpmsOrganizationApi;
import ace.module.upms.api.model.dto.UpmsOrganizationDto;
import ace.module.upms.core.impl.dao.entity.UpmsOrganization;
import ace.module.upms.sdk.core.feign.impl.UpmsOrganizationFeign;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.experimental.Delegate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 组织 rpc controller.
 *
 * @author Caspar
 */
@Tag(name = "组织-RPC-API")
@PreAuthorizeIsInternalClient
@ApiRemoteImplementPriority
@AllArgsConstructor
@RestController
@RequestMapping(UpmsOrganizationFeign.PATH)
public class UpmsOrganizationRpcController
    extends AbstractSdkRestController<UpmsOrganization, Long, UpmsOrganizationDto>
    implements UpmsOrganizationFeign {

  @Delegate
  private final UpmsOrganizationApi upmsOrganizationApi;
}